package org.jivesoftware.smack.filter;

import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;

public class ThreadFilter
  implements PacketFilter
{
  private String thread;

  public ThreadFilter(String paramString)
  {
    if (paramString == null)
      throw new IllegalArgumentException("Thread cannot be null.");
    this.thread = paramString;
  }

  public boolean accept(Packet paramPacket)
  {
    int i;
    if ((paramPacket instanceof Message) && (this.thread.equals(((Message)paramPacket).getThread())))
      i = 1;
    while (true)
    {
      return i;
      i = 0;
    }
  }
}